<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box1{
            background-color: mediumpurple;
            float: left;
        }
    </style>

</head>
<body>
<!--
收缩指的是:
如果一个block元素 浮动之后 它的宽度就由内容决定 而不是由父容器决定
-->
<div class="box1">
    SSSS
</div>
<hr>
<div style="background-color:red;">
    <div style="background-color:greenyellow; width: 100px;height: 100px;float: right">

    </div>
    <div style="background-color:cyan; width: 200px;height: 200px;float: right">

    </div>
</div>

</body>
</html>